public class Student {
    String name;
    int age;
    // 定义一个变量作为construct函数是否被调用过的状态指示
    static private boolean instance = true;
    static private Student temporaryC;

    private Student() {

    }
    // 使用此函数进行构造
    private static void construct(){
        temporaryC = new Student();
    }

    // 检测状态指示，指示为真则进行构造，否则返回已构造过的变量
    public static Student judge(){
        if (instance){
            construct();
            instance = false;
        }
        return temporaryC;
    }

    public static Student getInstance(){

    }
}
